home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Diversos / coki.swf / scripts / frame_7 / PlaceObject2_100_6 / CLIPACTIONRECORD onClipEvent(enterFrame).as
Encoding:
Text File  |  2007-10-01  |  654 b   |  36 lines

  1. onClipEvent(enterFrame){
  2.    if(_root._xmouse <= 420 && _root._ymouse < 270)
  3.    {
  4.       Mouse.hide();
  5.       this._x = _root._xmouse;
  6.       this._y = _root._ymouse;
  7.    }
  8.    else
  9.    {
  10.       Mouse.show();
  11.    }
  12.    dogX1 = dogX2;
  13.    dogX2 = this._x;
  14.    var dogX3;
  15.    directionX = dogX2 - dogX1;
  16.    if(directionX > 0)
  17.    {
  18.       this.gotoAndStop("right");
  19.    }
  20.    if(directionX < 0)
  21.    {
  22.       this.gotoAndStop("left");
  23.    }
  24.    if(directionX == 0)
  25.    {
  26.       if(dogX3 == "right")
  27.       {
  28.          this.gotoAndStop("right_stop");
  29.       }
  30.       if(dogX3 == "left")
  31.       {
  32.          this.gotoAndStop("left_stop");
  33.       }
  34.    }
  35. }
  36.